function JoinRoomPw() {
	thisJoinRoomPw = this;
	this.TAG = " < JoinRoomPw > ";
	this.password = null;
	this.afterChangeUrl = null;
}

JoinRoomPw.prototype = {
	onPageShow: function () {
		this.init();
	},
	init: function() {
		 this.password = document.globalObj.joinRoomItemPw + "";
		 this.changeUrl = document.globalObj.join_room_pw.afterChangeUrl;
		 console.log(this.TAG + this.changeUrl);
		 this.initFormEvent();
	},
	initFormEvent: function() {
		var $layer = $("section#join_room_pw");
		var confirmBtn = $layer.find("#join_room_pw_confirm_btn");
		
		confirmBtn.on("click", function($event) {
			var password = $layer.find("#input_password").val();
			console.log("조인룸암호:"+thisJoinRoomPw.password);
			if(password === thisJoinRoomPw.password) {
				console.log("암호확인!!");
				//console.log("이동경로:"+thisJoinRoomPw.afterChangeUrl);
				if(thisJoinRoomPw.changeUrl)
					$.mobile.changePage(thisJoinRoomPw.changeUrl);
				else
					alert("이동경로가 불확실함");
			}
			else {
				alert("암호가 맞지 않습니다.");
			}
		});
	}
}
